package com.beordie.model;

import com.beordie.utils.DateFormatUtils;

import java.util.Date;

/**
 * @Classname FormatCar
 * @Description 标准的 car
 * @Date 2021/7/12 16:39
 * @Created 30500
 */
public class FormatCar {
    private Integer id;
    private String number;
    private String model;
    private String factory;
    private String createTime;
    private Integer seat;
    private String color;
    private Integer price;

    public FormatCar() {
    }

    public FormatCar(Car car) {
        this.id = car.getId();
        this.number = car.getNumber();
        this.model = car.getModel();
        this.factory = car.getFactory();
        this.createTime = DateFormatUtils.getTimeString(car.getCreateTime());
        this.seat = car.getSeat();
        this.color = car.getColor();
        this.price = car.getPrice();
    }

    @Override
    public String toString() {
        return "FormatCar{" +
                "id=" + id +
                ", number='" + number + '\'' +
                ", model='" + model + '\'' +
                ", factory='" + factory + '\'' +
                ", createTime='" + createTime + '\'' +
                ", seat=" + seat +
                ", color='" + color + '\'' +
                ", price=" + price +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Integer getSeat() {
        return seat;
    }

    public void setSeat(Integer seat) {
        this.seat = seat;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }
}
